package com.enbatis.mybatisplugs.commons.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.Collection;

public class BaseUtil {


    public static String join(Collection<?> str) {
        StringBuilder sb=new StringBuilder();

        for (Object o:str) {
            if (o instanceof Long){
                sb.append(o).append(",");
            }else if (o instanceof String){
                sb.append("'").append(o).append("'").append(",");
            }
        }

        if (sb.length()>0){
            return sb.toString().substring(0,sb.length()-1);
        }

        return "";

    }
}
